<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <script>
    // 1.假设今天星期二  1000后星期几
    var today = parseInt(prompt('请输入星期几,以1-7之间的数', '2'));
    var day = parseInt(prompt('请输入任意天数', '1000'));

    //              
    var future = (today + day) % 7;

    if (future === 0) {
      future = 7;
    }

    alert('星期' + today + '的' + day + '天后是星期' + future);
    // 星期1

  </script>
</body>

</html>